<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <hello-age :age-list="age"></hello-age>
    </div>
    <script>
        //驼峰命名法
        Vue.component('hello-age', {
            props: ['ageList'],
            data: function() {
                return {
                    name: 'Tom'
                }
            },
            template: `
                <div>
                    <p>{{ageList}}岁啦，小{{name}}</p>
                </div>
            `,

        })
        var vm = new Vue({
            el: '#app',
            data: {
                age: 3
            }
        })
    </script>
</body>

</html>